package finalproject.controller.commands;

import finalproject.model.player.Player;
import finalproject.view.StringManager;

/**
 * The quit command
 * @author Buisson Kevin
 *
 */
public class QuitCommand extends Command {

	/**
	 * 
	 * @param player the player issuing the command
	 * @param args the args of the command
	 */
	public QuitCommand(Player player, String[] args)
	{
		super(player, args);
	}

	@Override
	public boolean process()
	{
		// Why args ?
		if (hasSecondWord())
		{
			StringManager.outPut("quitwhat");
			return false;
		}

		// Player finished turn
		getPlayer().setFinished(true);
		StringManager.outPut("quit");
		return true;
	}
}
